/*
 * Copyright (c) 2021. Moses All Right Reserved
 */

package com.moses.design_patterns.adapter.object_adapter;

import com.moses.design_patterns.adapter.class_adapter.Adaptee;
import com.moses.design_patterns.adapter.class_adapter.Info;
import com.moses.design_patterns.adapter.class_adapter.Target;

/**
 * @author Moses
 * @email shenhuohui@gmail.com
 * @date 2021/4/13 0:15
 */
public class ObjectAdapter extends Target {
    private Info info;

    public ObjectAdapter(Adaptee adaptee){
        this.info = adaptee.getInfo();
    }

    @Override
    public int getGender() {
        return this.info.gender;
    }

    @Override
    public int getAge() {
        return this.info.age;
    }
}
